package edu.put.sk.nrpp.isis.packet;

import edu.put.sk.nrpp.Bit;

abstract public class ISISPacket {
	
	protected Bit[] _data;
	
	public static ISISPacket getInstance(Bit[] header,Bit[] data) throws Exception{
		
		int destAddress=Bit.toInt(Bit.cut(header, 0, 47));
		if(destAddress==-1040187374){
			return new ISISPacketL1(data);
		}
		else if(destAddress==-1040187375){
			return new ISISPacketL2(data);
		}
					
		return null;
	}

	/**
	 * @return the _data
	 */
	public Bit[] getData() {
		return _data;
	}
	

	
}
